<?php
ArrowController::importModel("org.arrowplatform.model.IArrowModelAction");
class ArrowModelAction implements IArrowModelAction{
	private $id;
	private $name;
	private $type;
	private $description;
	private $isAllowed = false;
	public function __construct( $id, $name, $type, $isAllowed, $description = ""  ){
		$this->id = $id;
		$this->name = $name;
		$this->isAllowed = $isAllowed;
		$this->description = $description ;
		
		switch( $type ) {
			case "":
				$type = ArrowModelAction::ACTION_STATIC ;
				break;
			case "simple" : 
				$type = ArrowModelAction::ACTION_SIMPLE ;
			  break;
			case "other_object" :
				$type = ArrowModelAction::ACTION_OBJECT ;
			  break;
				
		}
		
		$this->type = $type;
	}
	public function getId(){
		return $this->id;
	}
	public function getName(){
		return $this->name;
	}
	public function isAllowed(){
		return $this->isAllowed;
	}
	public function getDescription(){
		return $this->description;
	}
	public function getType(){
		return $this->type;
	}
}
?>